* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  font: bold 20px "Courier";
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(to bottom, #f1f4f9, #dff1ff);
}
.color {
  /* 绝对定位 */
  position: absolute;
  /* 使用filter(滤镜) 属性，给图像设置高斯模糊*/
  filter: blur(200px);
  width: 90vw;
  height: 90vw;
}
.color:nth-child(1) {
  top: -40vw;
  left: -40vw;
  background: #ff359b;
}
.color:nth-child(2) {
  bottom: -40vw;
  left: 20vw;
  background: #fffd87;
}
.color:nth-child(3) {
  right: -30vw;
  background: #00d2ff;
}
.circle {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  /* backdrop-filter属性为一个元素后面区域添加模糊效果 */
  backdrop-filter: blur(5px);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  /* 使用filter(滤镜) 属性，改变颜色。
    hue-rotate(deg)  给图像应用色相旋转 
    calc() 函数用于动态计算长度值 
    var() 函数调用自定义的CSS属性值x*/
  filter: hue-rotate(calc(var(--x) * 70deg));
  /* 调用动画animate，需要10s完成动画，
    linear表示动画从头到尾的速度是相同的，
    infinite指定动画应该循环播放无限次*/
  /* 动态计算动画延迟几秒播放 */
  animation-delay: calc(var(--x) * -1s);
  width: 50vw;
  height: 50vw;
  filter: blur(2px);
  text-align: center;
  line-height: 50vw;
  z-index: 2;
}
#circle1 {
  top: -20vh;
  left: -30vw;
}
#circle2 {
  top: -10vh;
  left: 50vw;
}
#circle3 {
  top: 60vh;
  left: 5vw;
  z-index: 2;
}
#circle4 {
  top: 70vh;
  left: 70vw;
}
#circle5 {
  top: 30vh;
  left: 40vw;
}
#introduction {
  position: absolute;
  top: 50px;
  width: 100%;
  height: 100px;
  z-index: 999;
}
#introduction h1 {
  line-height: 100px;
  text-align: center;
}
#introduction #operation {
  position: absolute;
  left: 70%;
  top: 70%;
}
#main {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  height: 420px;
  background-color: #b7d4a8;
  border: 10px solid black;
  border-radius: 40px;
  z-index: 999;
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: space-around;
}
#main #stage {
  position: relative;
  width: 304px;
  height: 304px;
  border: 2px solid black;
  background-color: #b7d4a8;
}
#main #stage #snake > div {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #000;
  border: 1px solid #b7d4a8;
}
#main #stage #food {
  position: absolute;
  top: 100px;
  left: 100px;
  width: 10px;
  height: 10px;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-around;
  align-content: space-around;
}
#main #stage #food > div {
  width: 4px;
  height: 4px;
  background-color: #000;
  transform: rotate(45deg);
}
#main #score-panel {
  width: 300px;
  display: flex;
  justify-content: space-between;
}
